<?php
Yii::app()->clientScript->scriptMap['jquery.js'] = false;

Util::tsRegisterAssetJs('_form_modal_factura.js');
Util::tsRegisterAssetJs('jquery.validateAjax.js')
?>

<?php
// Prevenir que jquery se cargue dos veces
$form = $this->beginWidget('ext.AweCrud.components.AweActiveForm', array(
    'id' => 'persona-form',
    'type' => 'horizontal',
    'action' => Yii::app()->createUrl('/personas/persona/personaFactura'),
    'enableAjaxValidation' => true,
    'clientOptions' => array('validateOnSubmit' => true, 'validateOnChange' => false,),
    'enableClientValidation' => false,
        ));
?>

<div class="modal-header">
    <!--<a class="close" data-dismiss="modal">&times;</a>-->
    <!--<h3 id="h3Modal">Tickets Libres</h3>-->
    <h4 id="h3Modal"><i class="icon-user"></i> Persona</h4>
</div>
<div class="modal-body">
      <?php echo $form->textFieldRow($model, 'numeroFactura',array('class' =>'numeric')) ?>
      <?php echo $form->textFieldRow($model, 'cedula', array('class' =>'documento','maxlength' => 15 )) ?>
                        <?php echo $form->textFieldRow($model, 'nombres', array('maxlength' => 64)) ?>
                        <?php echo $form->textFieldRow($model, 'correo', array('maxlength' => 32)) ?>
</div>

<div class="modal-footer">
      <?php $this->widget('bootstrap.widgets.TbButton', array(
//			'buttonType'=>'success',
			'type'=>'primary',
			'label'=>'OK',
          'htmlOptions' => array(
            'onClick' => 'js:savePersona("#persona-form")'
        )
		)); ?>
    <?php
    $this->widget('bootstrap.widgets.TbButton', array(
//        'icon' => 'remove',
        'type' => 'inverse',
        'label' => Yii::t('AweCrud.app', 'Cancel'),
        'htmlOptions' => array(
            'onClick' => 'js: encerarDatos();',
            'data-dismiss' => 'modal'
        )
//        'htmlOptions' => array('data-dismiss' => 'modal')
    ));
    ?>

</div>
<?php $this->endWidget(); ?>
